<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function zh(){
            let n = 1;
            return function(){
                let m=1;
                return function(){
                    console.log('m=>'+ ++m)
                    console.log('n=>'+ ++n)
                }
            }
        }
        let a = zh()();
        a();
        a();

        for(var i=0;i<=3;i++){
            console.log(i) // 0 1 2 3
        }
        console.log(i) // 4

        for(let x=0;x<=3;x++){
            console.log(x) // 0 1 2 3
        }
        
        // console.log(x) // x is not defined
    </script>
</body>
</html>